package nl.infodation.emr.pricingservice.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

@Entity
@Table(name="system_value_ref")
public class SystemValueRef {

	@Id
	@Column(name="id")
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer systemValueRefId;
	
	@ManyToOne(fetch=FetchType.EAGER, cascade = CascadeType.MERGE)
	@LazyCollection(LazyCollectionOption.EXTRA)
	@JoinColumn(name="system_value_id")
	private SystemValue systemValue;
	
	@Column(name = "label")
	private String label;
	
	@ManyToOne(fetch=FetchType.EAGER, cascade = CascadeType.MERGE)
	@LazyCollection(LazyCollectionOption.EXTRA)
	@JoinColumn(name="language_id")
	private LanguageSystem languageSystem;

	public Integer getSystemValueRefId() {
		return systemValueRefId;
	}

	public void setSystemValueRefId(Integer systemValueRefId) {
		this.systemValueRefId = systemValueRefId;
	}

	public SystemValue getSystemValue() {
		return systemValue;
	}

	public void setSystemValue(SystemValue systemValue) {
		this.systemValue = systemValue;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public LanguageSystem getLanguageSystem() {
		return languageSystem;
	}

	public void setLanguageSystem(LanguageSystem languageSystem) {
		this.languageSystem = languageSystem;
	}
	
}
